<%@ page language="java"  pageEncoding="UTF-8"%>
<%@include file="/common/jsp/taglibs-nojs-nocss.jsp"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort()+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<title>鼎烜电力集团网络办公平台</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
	</head>
<body>
 <form id="thisForm" action="examineSeting.action" method="post" >
	<table  width="100%" border="0" align="center">
		<Tr>
			<td colspan="2">
				<div class="window_1">
		        	<div id="assistFee_div">
		            	<h3 class="priceRulelist_title_pic_2">请选择以下人员对您的评价类型，没有可不选</h3>
		        	</div>
			    </div>
			</td>
		</Tr>
		<tr>
	        <td style="width:50%;" align="center">
				  <div id="container_border">
				        <div id="pricerulemanage" style="height:350px;">
				            <table width="100%" border="0" cellpadding="0"  cellspacing="0" class="gridview"  id="pricerule_table">
				                <thead>
					                <tr class="title">
					                    <td>序号</td>
					                    <td>中文名称</td>
					                    <td>考核类型<input id="fromUserId" type="hidden" style="width: 300px;" name="examineSetingVo.fromUserId" value="<s:property value="examineFormulaVo.userId"/>" /></td>
					                </tr>
				                </thead>
				                <tbody class="mytbody">
				                	<s:if test="examineSetingUserList.size()==0">
				                		<tr>
				                			<td colspan="5" align="center">无记录</td>
				                		</tr>
				                	</s:if>
				                	<s:else>
						                <s:iterator value="examineSetingUserList" id="esul" status="stat">
							                <s:if test="name != 'admin' && (#request.examineSetingVo == null || id != #request.examineSetingVo.fromUserId)">
									            <tr>
									               	<td><s:property value="#stat.count"/><input type="hidden" name="toUserList[<s:property value="#stat.index"/>].toUserId" value="<s:property value="id"/>"/></td>
									                <td><s:property value="cname"/></td>
									                <td>
									                <select id="type" name="toUserList[<s:property value="#stat.index"/>].type"  style="width: 200px">
									                	<option value="">请选择</option>
										                <s:iterator value="formulaMap" id="fm">
										                	<s:if test="#fm!=null">
																<option value="<s:property value="#fm.key"/>" <s:if test="examineSetingMap.get(#esul.id).type==#fm.key">selected="selected"</s:if>><s:property value="#fm.value"/></option>
										                	</s:if>
										                </s:iterator>
									                </select>
									                </td>
									            </tr>
									         </s:if>
								        </s:iterator>
				                	</s:else>
				                </tbody>
				            </table>
			           </div> 
			     </div>
			 </td>
	 	</tr>
	 	<tr>
	 		<td colspan="2"><input type="button" id="thisButton" value="提交" class="btn" onmouseout="this.className='btn'" onmousedown="this.className='btn1'" onmouseover="this.className='btn2'"></td>
	 	</tr>
	 </table>
 </form>
</body>
<script type="text/javascript">
/* 表单提交 */
	i.formSubmit("thisButton",	//绑定的按钮id
					  "thisForm" ,   //提交的表单id
					  function(result){
						  	var jsonMsgObj=new JsonMsgObj(result);
							var  msg=jsonMsgObj.getMessage();
						    var codeId=jsonMsgObj.getCodeid();
							var isOk=jsonMsgObj.getIsok();
							if( isOk ){
							    aerouiAlert(msg);
								hideDialog();// 隐藏窗口
								location.reload();
							}else{		// 如果编辑失败了
							  JsManageInfoHandleException( result , function(msg , codeId , isOk){
							  		hideDialog();// 隐藏窗口
							   });
						   }
						});
</script>
<script type="text/javascript">
	function setUserId(id){
		document.getElementById("fromUserId").value=id;
		var _url = 'setExaminePerson.action?examineSetingVo.fromUserId='+id;
		location.href = _url;
	}
//	function checkAll(name) { 
//		var el = document.getElementsByTagName('input'); 
//		var len = el.length; 
//		for(var i=0; i<len; i++) { 
//			if((el[i].type=="checkbox")) { 
//				el[i].checked = true; 
//			}
//		} 
//	} 
	function clearAll() { 
		var el = document.getElementsByTagName('input'); 
		var len = el.length; 
		for(var i=0; i<len; i++) {
			if((el[i].type=="checkbox")) { 
				el[i].checked = false; 
			} 
		} 
	} 
</script>
</html>